import 'package:flutter/material.dart';
import 'RouteDataTestRoute.dart';
import 'RouteJumpReturnsData.dart';
import 'pages/BottomNavigationBarTestRoute.dart';
import 'bottomAppBar/BottomAppBarTestRoute.dart';
import 'routeAnimation/RouteAnimationTestRoute.dart';
import 'frostedGlass/FrostedGlassTestRoute.dart';
import 'keepAlive/KeepAliveDemoRoute.dart';
import 'searchBar/SearchBarDemoRoute.dart';
import 'wrap/WrapLayoutDemoRoute.dart';
import 'expansion/ExpansionTileDemoRoute.dart';
import 'clipper/CustomClipperDemoRoute.dart';
import 'splashScreen/SplashScreenDemoRoute.dart';
import 'rightBack/RightBackDemoRoute.dart';
import 'tips/ToolTipDemoRoute.dart';
import 'draggable/DraggableDemoRoute.dart';
import 'dioHttp/dio.dart';

class StudyDemoPage extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Center(
        child: Wrap(
          spacing: 4.0,
          children: <Widget>[
            RaisedButton(
              colorBrightness: Brightness.dark,
              child: Text('导航参数的传递与接收'),
              onPressed: () {
                Navigator.push(
                  context,
                  MaterialPageRoute(
                    builder: (context) {
                      return RouteDataTestRoute();
                    },
                  ),
                );
              },
            ),
            RaisedButton(
              colorBrightness: Brightness.dark,
              child: Text('页面跳转并返回数据'),
              onPressed: () {
                Navigator.push(
                  context,
                  MaterialPageRoute(
                    builder: (context) {
                      return RouteJumpReturnsData();
                    },
                  ),
                );
              },
            ),
            RaisedButton(
              colorBrightness: Brightness.dark,
              child: Text('底部导航栏'),
              onPressed: () {
                Navigator.push(
                  context,
                  MaterialPageRoute(
                    builder: (context) {
                      return BottomNavigationBarTestRoute();
                    },
                  ),
                );
              },
            ),
            RaisedButton(
              colorBrightness: Brightness.dark,
              child: Text('不规则底部工具栏'),
              onPressed: () {
                Navigator.push(
                  context,
                  MaterialPageRoute(
                    builder: (context) {
                      return BottomAppBarTestRoute();
                    },
                  ),
                );
              },
            ),
            RaisedButton(
              colorBrightness: Brightness.dark,
              child: Text('路由切换动画'),
              onPressed: () {
                Navigator.push(
                  context,
                  MaterialPageRoute(
                    builder: (context) {
                      return RouteAnimationTestRoute();
                    },
                  ),
                );
              },
            ),
            RaisedButton(
              colorBrightness: Brightness.dark,
              child: Text('毛玻璃效果'),
              onPressed: () {
                Navigator.push(
                  context,
                  MaterialPageRoute(
                    builder: (context) {
                      return FrostedGlassTestRoute();
                    },
                  ),
                );
              },
            ),
            RaisedButton(
              colorBrightness: Brightness.dark,
              child: Text('页面数据保持'),
              onPressed: () {
                Navigator.push(
                  context,
                  MaterialPageRoute(
                    builder: (context) {
                      return KeepAliveDemoRoute();
                    },
                  ),
                );
              },
            ),
            RaisedButton(
              colorBrightness: Brightness.dark,
              child: Text('搜索栏Demo'),
              onPressed: () {
                Navigator.push(
                  context,
                  MaterialPageRoute(
                    builder: (context) {
                      return SearchBarDemoRoute();
                    },
                  ),
                );
              },
            ),
            RaisedButton(
              colorBrightness: Brightness.dark,
              child: Text('Wrap流式布局'),
              onPressed: () {
                Navigator.push(
                  context,
                  MaterialPageRoute(
                    builder: (context) {
                      return WrapLayoutDemoRoute();
                    },
                  ),
                );
              },
            ),
            RaisedButton(
              colorBrightness: Brightness.dark,
              child: Text('ExpansionDemo'),
              onPressed: () {
                Navigator.push(
                  context,
                  MaterialPageRoute(
                    builder: (context) {
                      return ExpansionTileDemoRoute();
                    },
                  ),
                );
              },
            ),
            RaisedButton(
              colorBrightness: Brightness.dark,
              child: Text('路径裁切和二次贝赛尔曲线'),
              onPressed: () {
                Navigator.push(
                  context,
                  MaterialPageRoute(
                    builder: (context) {
                      return CustomClipperDemoRoute();
                    },
                  ),
                );
              },
            ),
            RaisedButton(
              colorBrightness: Brightness.dark,
              child: Text('App闪屏动画'),
              onPressed: () {
                Navigator.push(
                  context,
                  MaterialPageRoute(
                    builder: (context) {
                      return SplashScreenDemoRoute();
                    },
                  ),
                );
              },
            ),
            RaisedButton(
              colorBrightness: Brightness.dark,
              child: Text('右滑返回效果（苹果）'),
              onPressed: () {
                Navigator.push(
                  context,
                  MaterialPageRoute(
                    builder: (context) {
                      return RightBackDemoRoute();
                    },
                  ),
                );
              },
            ),
            RaisedButton(
              colorBrightness: Brightness.dark,
              child: Text('轻提醒ToolTip'),
              onPressed: () {
                Navigator.push(
                  context,
                  MaterialPageRoute(
                    builder: (context) {
                      return ToolTipDemoRoute();
                    },
                  ),
                );
              },
            ),
            RaisedButton(
              colorBrightness: Brightness.dark,
              child: Text('拖拽控件'),
              onPressed: () {
                Navigator.push(
                  context,
                  MaterialPageRoute(
                    builder: (context) {
                      return DraggableDemoRoute();
                    },
                  ),
                );
              },
            ),
            RaisedButton(
              colorBrightness: Brightness.dark,
              child: Text('Dio实现Http'),
              onPressed: () {
                Navigator.push(
                  context,
                  MaterialPageRoute(
                    builder: (context) {
                      return DioHttp();
                    },
                  ),
                );
              },
            ),
          ],
        ),
      ),
    );
  }
}

